package com.cy.study.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cy.study.entity.CourseEntity;
import com.cy.study.req.CourseAddReq;
import com.cy.study.req.CoursePageReq;
import com.cy.study.req.UserCoursePageReq;
import com.cy.study.res.CoursePageRes;
import com.cy.study.res.UserCoursePageRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface CourseMapper extends BaseMapper<CourseEntity> {
    Page<CoursePageRes> pageCourse(@Param("req") CoursePageReq req,
                                   Page page);

    Page<UserCoursePageRes> userCoursePage(@Param("req") UserCoursePageReq req,
                                           Page page);
}
